package mercurius.fitness.client.rb.user;

import java.util.Date;

import net.pleso.framework.client.dal.db.types.DBDate;
import net.pleso.framework.client.dal.db.types.DBFloat;
import net.pleso.framework.client.dal.db.types.DBInteger;
import net.pleso.framework.client.dal.db.types.DBString;

public class UserInfo {
	
	private Integer id = DBInteger.nullValue;
	private String user = DBString.nullValue;
	private String firstname = DBString.nullValue;
	private String lastname = DBString.nullValue;
	private Date dob = DBDate.nullValue;
	private Integer hr_max = DBInteger.nullValue;
	private Float vo2_max = DBFloat.nullValue;
	private Integer gender = DBInteger.nullValue;
	private Float height = DBFloat.nullValue;
	private String height_unit = DBString.nullValue;
	private String feedkey = DBString.nullValue;
	private String adminfeedkey = DBString.nullValue;
	
	public UserInfo() {}
	
	public UserInfo(Integer id, 
					String user,
					String firstname,
					String lastname,
					Date dob,
					Integer hr_max,
					Float vo2_max,
					Integer gender,
					Float height,
					String height_unit,
					String feedkey,
					String adminfeedkey
						) {
		this.id = id;
		this.user = user;
		this.firstname = firstname;
		this.lastname = lastname;
		this.dob = dob;
		this.hr_max = hr_max;
		this.vo2_max = vo2_max;
		this.gender = gender;
		this.height = height;
		this.height_unit = height_unit;
		this.feedkey = feedkey;
		this.adminfeedkey = adminfeedkey;
		
	}

	public Integer getID() {
		return id;
	}
	
	public void setID(Integer i) {
		id = i;
	}
	
	public Date getDob() {
		return dob;
	}
	
	public void setDob(Date d) {
		dob = d;
	}
	
	public Integer getHRMax() {
		return hr_max;
	}
	
	public void setHRmax(Integer d) {
		hr_max = d;
	}
	
	public Float getVo2Max() {
		return vo2_max;
	}
	
	public void setVo2Max(Float d) {
		vo2_max = d;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String d) {
		user = d;
	}

	public Float getHeight() {
		return height;
	}
	
	public void setHeight(Float d) {
		height = d;
	}
	
	public String getHeightUnit() {
		return height_unit;
	}
	
	public String getHeightUnitString() {
		if(height_unit.equals("1")) {
			return "in";
		} else if(height_unit.equals("2")) {
			return "cm";
		} else {
			return null;
		}
	}
	
	public void setHeightUnit(String du) {
		height_unit = du;
	}
	
	public Integer getGender() {
		return gender;
	}
	
	public void setGender(Integer h) {
		gender = h;
	}

	public String getFirstName() {
		return firstname;
	}
	
	public void setFirstName(String u) {
		firstname = u;
	}	
	
	public String getLastName() {
		return lastname;
	}
	
	public void setLastName(String z) {
		lastname = z;
	}	
	
	public String getFeedkey() {
		return feedkey;
	}
	
	public void setFeedkey(String u) {
		feedkey = u;
	}	
	
	public String getAdminFeedkey() {
		return adminfeedkey;
	}
	
	public void setAdminFeedkey(String z) {
		adminfeedkey = z;
	}
}
